package org.broadway.jmx;

/***
 * This is the management interface for ScriptedAction compoent.
 * @author VVivien
 */
public interface JmxScriptedActionMBean {
    /***
     * Sets the location of the action script to be executed.
     * @param location
     */
    public void setScriptFileLocation(String location);
    /***
     * Getter that returns script file location.
     * @return
     */
    public String getScriptFileLocation();
    /***
     * Adds a JMX Monitor object that will monitor objects to determine when to execute action.
     * @param monitorName - the JMX Object name of a Monitor object.
     */
    public void addJmxMonitor(String monitorName);
    /***
     * Removes the monitor and stops listening for event notification.
     * @param monitorName
     */
    public void removeJmxMonitor(String monitorName);

    /***
     * Controller method to start component.
     */
    public void start();
    /***
     * Controller method to stop component.
     */
    public void stop();
    /***
     * Status method for the component.
     * @return
     */
    public boolean isStarted();
    /***
     * Returns date componet was created.
     * @return
     */
    public String getDateCreated();
    /***
     * Returns date component was last started.
     * @return
     */
    public String getDateStarted();
    /***
     * Returns date component was last stopped.
     * @return
     */
    public String getDateStopped();

    /***
     * Number of time the action component has been executed.
     * @return
     */
    public long getExecutionCount();

    /**
     * Last time action was executed.
     * @return
     */
    public String getLastExecutionDate();
}
